package com.starblink.basic.ext

import android.app.Activity
import com.blankj.utilcode.util.BarUtils
import com.blankj.utilcode.util.ScreenUtils
import com.starblink.basic.util.CommUtils


fun nowTime() = System.currentTimeMillis()

/**
 * 分辨率高度，包含状态栏和导航栏
 */
val screenHeight: Int get() = ScreenUtils.getScreenHeight()

val screenWidth: Int get() = ScreenUtils.getScreenWidth()

/**
 * 应用高度，不包含导航栏
 */
val appScreenHeight: Int get() = screenHeight -  CommUtils.getBottomStatusHeight()

/**
 * 当前Activity的root view容器高度
 */
val Activity.contentViewHeight: Int
    get() = screenHeight - (if (BarUtils.isSupportNavBar() && BarUtils.isNavBarVisible(this)) CommUtils.getBottomStatusHeight() else 0)

val Activity.contentViewHeight2: Int
    get() = screenHeight - (if (BarUtils.isSupportNavBar() && BarUtils.isNavBarVisible(this)) com.starblink.basic.autosize.utils.ScreenUtils.getNavBarHeight(
        this
    ) else 0)


//状态栏高度 统一为24  标题栏高度 统一为64

//val statusBarHeight: Int get() = BarUtils.getStatusBarHeight()
//